home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus Extra 1997 #4
/
Amiga Plus Extra 1997 #4.iso
/
pd
/
grafik
/
video easel
/
xlife
/
primes.life
< prev
next >
Wrap
Text File
|
1997-06-09
|
17KB
|
1,586 lines
#N Primer, a prime number sieve.
#O Dean Hickerson, drhickerson@ucdavis.edu 11/1/91
#C Produces a westward stream of lightweight spaceships
#C representing prime numbers: a LWSS escapes past the
#C pentadecathlon around generation 120n+100 if and
#C only if n is prime. This is probably not a good way
#C to look for the largest primes!
#P -128 -36
.******
*.....*
#P -123 -34
.*
*
#P -93 -36
...**
***.**
#P -93 -34
*****
.***
#P 282 -245
..**
**.**
****
.**
#P 282 -241
.
.
.
.
#P 287 -244
.............**
............****
............**.**
..............**
.
.
.
...........**
..........*..*
..........*..**
.........*..**
.........****
.
.
.............**
....****....****
...*...*....**.**
*......*......**
*.....*
*
#P 287 -223
.....................**
............****....****
*..........*...*....**.**
*..............*......**
*.............*
..................*
................*
................*..**
...............*.....*
................*.*..**
................*...**
..................***
.
.
.....................**
....................****
...**...............**.**
..****................**
..**.**
....**
#P 260 -232
*
.*
#P 256 -230
*....*
.*****
#P 268 -232
*
.**
#P 268 -230
**
#P 279 -228
.......*
.
....*
.....***
***
#P 277 -223
**.**
..***
.......***
......*
.
.........*
#P 253 -217
*
.**
**
#P 253 -213
.
.
.
#P 275 -207
.*
*
***
.
.
.
........**
......**.**
......****
...*...**
..**
...*...**
#P 268 -195
.............****
.............**.**
...............**
.
.
.****
*...*
....*
...*
#P 238 -202
*
.**
**
#P 238 -198
.
.
.
#P 232 -195
.
.
.
#P 230 -192
.*
*
***
#P 223 -187
*
.**
#P 223 -185
**
#P 227 -188
...........................**
..................****....****
.................*...*....**.**
.....................*......**
....................*
........................*
......................*
......................*..**
.....................*.....*
......................*.*..**
......................*...**
........................***
.
.
...........................**
..........................****
.........**...............**.**
........****................**
........**.**
..........**
.
.
..**
**.**
****
.**
.
.**
****
**.**
..**
.....................................**
....................................***
....................................**
......................................*
.
.
..............................**
............................**.**
........................*...****
......................**.*...**
......................*...*
......................**.*...**
........................*...****
............................**.**
#P 227 -143
..............................**
.
*
*...............****
*..............*...*
...................*
..................*
.
.
...........**
...........*.*
............**
.
.
.
..............................**
............................**.**
........................*...****
...................**..*.*...**
..................*..**...*
...................**..*.*...**
........................*...****
............................**.**
..............................**.....**
.....*.............................**.*
......*............................****
.*....*.............................**
..*****
.
.
.
.....................................**
.....................................*
.
....................***
......................*
.....................*
.
.............................*
..............................*
..........................*...*
...........................****
#P 185 -177
.*
*
***
#P 185 -169
.
.
.
#P 208 -172
*
#P 208 -171
.**
**
#P 272 -173
..........**
.****....****
*...*....**.**
....*......**
...*
.
.
........**
........*.*
#P 280 -164
*.**
.**
.*
.
.
..**
.****
.**.**
...**
#P 140 -162
.*
*
#P 140 -160
***
#P 173 -164
..................................................*
................................................**.*
................................................*...*
................................................**.*
..................................................*
.
.
.
.
..........................................****
.........................................*...*
.............................................*
............................................*
.
.
.
.
.
.
*.............................*
***...........................***
...*.............................*
..**............................**...................*
.
................................................*
.................................................*****
.
.
.
.
.....**............................**
.....*.*...........................*.*
......**............................**
.
.
.
.
.
........................**
#P 157 -125
.......................................****
.......................................**.**
.....................**..................**
.....................*.*..........*.*
................**....**.........*..**........................**
................*.................*.*................****....****
.........................................**.........*...*....**.**
.......................................**.**............*......**
.......................................****............*
...............***..............*.......**
.....****.....*****.............**................*
....*...*.....***.**...........*.*............*...*
........*........**..........................*...*.........*
*......*......................................*............******
..***................................*.........**.........*.***
*......*.............................**.............**.........*
........*...........................*.*.............*
....*...*
.....****.....................................................**
.............................................................****
.............................................................**.**
............****..............................**...............**
...........*...*............................**.**
...............*..............****..........****
..............*..............*...*...........**
.................................*
................................*
.
.
........................**...**
......................*......*.*
.....................*..*......*
....................**.......***
.....................**
.
.
.
.......................**.....****
.....................**.**...*...*
.....................****........*
......................**........*
#P 266 -156
*
**
*
.
.
.
.
.
.
.
.
.
.
....**
****.**
******
.****
..........**
.........****
.........**.**
...........**
.......*
.....*.*
.......*
...........**
.........**.**
.........****
#P 266 -129
..........**
.****
******
****.**
....**
.
.
.
.
.....****
*...*...*
........*
.......*
.
.
....**
...*..*
...*..*
..**.**
...**
.
.
.
.....****
....*...*
........*
.......*
#P 116 -143
*
*
.
.
.
.
.
.
.
..**
..*.*
#P 118 -132
.**
.
.
.
.
.
.
.
.
**
*.*
.**
#P 143 -145
*
***
...*
..**
.
.
.
.
.
.
.
.....**
.....*.*
#P 148 -132
.**
.
.
.
.
.
.
.
.
**
*.*
.**
#P 116 -111
.....*
....**
.
.
.
.
.
.
.
.
.
...*
....*
*...*
.****
........................**
.......................****
.......................**.**
.****....................**
*...*.....*
....*......*......**
#P 116 -90
...*...*...*....**.**
........****....****
.................**
.
...........*
..........*...***
.........*...*.***
..........*......**
...........*****.*
.............****
..............*
.
.
..................**
**..............**.**
***.............****
*.**.............**
.**
#P 150 -111
.*
**
#P 150 -107
.
.
#P 147 -26
*
.*
#P 143 -24
*....*
.*****
#P 156 -24
.............**........*
............****........*
............**.**...*...*
..............**.....****
.
.
*.*..............*.*
**.....**......**...*
.*.....*.*.....***.*.**
.........**....***....*
........*.........*...*
...................***
...................*
.
.......................*
.............**.........*
..........***.**....*...*
..........*****......****
...........***
.
.....**
...**.**
...****
....**
.
.
...*
...**
#P 149 4
.........*.**
.........*.*
.........**
.
.
....*
.....*......**
.*...*....**.**...**........*
..****....****...****........*
...........**....**.**...*...*
...................**.....****
.
.
.
........................**
.......................**.**
**......................*..*
.*......................*..*
.*.......................**
.
.
.....**.....................*
....*.*......................*
......*...*..............*...*
.........*...*............****
.........*..**
..............*
..........**
#P 141 -6
..**
**.**
****
#P 142 -3
**
#P 121 3
.**
***
***
#P 124 3
*
**
.**
**
#P 138 10
.**
*.*
..*
.
.
......**
.....*.*
.......*
#P 148 21
*
#P 113 -145
*
***
#P 115 -142
*
#P 110 -96
..***
**.**
#P 112 -94
***
#P 110 -79
**
.**
*
#P 115 -75
*
*
#P -25 -89
...........*
.....****...*
....*...*
........*
**..*..*
***
**..*..*
........*
....*...*
.....****
#P -12 -97
**..*..**
.*...*..**
.....*..*
......**
.
.
.*
..*......**
..*....**.**
***....****
........**
#P 63 -94
*
.**
..*
..*
.*
#P 63 -87
...*
....*
*...*
.****
#P 70 -94
.........................**
..........................**
.........................*
.
.
....................*****
...................*....*
........................*
.......................*
.........**
........****
........**.**
..........**...............**
.........................**.**
...*.*...................****
....**....................**
....*
.
.......................***
*....................*...**
*....................*.*..**
....................*.....*
.....................*..**
.....................*
....**.................*
...****............*
...**.**............*......**
.....**.........*...*....**.**
*................****....****
**........................**
*
.....**
#P 71 -62
..**.**
..****
...**
.
.
.**
****
**.**
..**
.
.......................**
..............****....****
..**.........*...*....**.**
**.**............*......**
****............*
.**.................*
..................*
..................*..**
.................*.....*
..................*.*..**
..................*...**
....................***
.
.*
.**....................**
*.*...................****
......................**.**
.......**...............**
.....**.**
.....****
......**
#P -48 -92
.**
*
#P -45 -92
***
..*
..*
.*
#P 16 -93
..**
**.**
****
.**
#P 24 -90
..*
*.*
.**
#P 33 -91
***
*..*
*
#P 33 -88
*
.*
#P 34 -83
...........*
............**
.
.
.....****
....*...*
........*
**..*..*
***
**..*..*
........*
....*...*
.....****
.
.
.
.
.
........**
.......*.*
.......**
#P 48 -85
*
.*
.*
**
.
.
.
.
.
.
.
.
...**
***.**
*****
.***
.
.
.
.........**
........*..*
.........**
.........***
#P 68 -75
*
.*
.*
#P 61 -67
.....*..*
*....*
.*..*
***..*
.*...*..*
*
#P 27 -63
.**
*.*
..*
#P 25 -56
..*
*.*
.**
#P 32 -55
...........................*
.......**..............***..*...*..*
.......*.*.............**..***..*...*
........**............*..*..*..*....**
.......................**..*....*...*
................................*..*
.
.
...............***
.....****.....*****
....*...*.....***.**
........*........**................*
**..*..*...........................**
***...............................*.*
**..*..*
........*
....*...*
.....****
.
.
............****
#P 43 -34
*...*
....*..............****
...*..............*...*
......................*
.....................*
.
.
...................*
....................*
....................*
...................**
..................*
.
.
.
............**.....****
..........**.**...*...*
..........****........*
...........**........*
#P -26 -47
.*
.**
*.*
#P -26 -42
.
.
.
#P -35 -37
............**
..........**.**
......*...****
.**..*.*...**
*..**...*
.**..*.*...**
......*...****
..........**.**
............**
.
.
.
.
.
.
.
.
.
.
.
.
.
.
...........*
............*
........*...*
.........****
#P -18 -29
..**.....****
**.**...*...*
****........*
.**........*
.
.
.........*
..........*
.....*....*
....**...**
........*
.
.
.
.........****
........*...*
............*
...........*
#P -52 -26
*
.***
#P -48 -28
*
.*
.*
**
#P 14 -27
.**
****
**.**
#P 16 -24
**
#P 22 -29
.**
*.*
..*
#P 22 -26
.
.
.
#P -1 -1
........**
.......****
*.*....**.**
.........**
.*
.*
.*
.
.
.*
.*
.*
#P -5 12
....*.*
.
.
......................*
.......................*
...................*...*
..**................****
**.**
****
.**
#P 22 2
...**
.**.**
.****
..**
.
.
.*
.**
*.**
*.*
**
.
.
.
...**
#P 23 17
**.**
****
.**
............**
...........****
...........**.**
.............**
......*.*
.....*..**
......*.*
.............**
...........**.**...**
...........****...****
............**....**.**
....................**
#P 49 28
...*
....*
*...*
.****
.
.
.
*
.**
#P 49 37
..*
..*
.*
.
.
...*
....*
*...*
.****
#P 7 31
.**
*
#P 10 31
***
..*
..*
.*
#P 33 45
****
#P 32 46
*...*
....*
...*
#P 13 -222
**
..*
#P 13 -218
*
#P 13 -208
..*
.***
**.*
***
#P 14 -204
**
#P 20 -206
..*
.***
*..**
#P 20 -203
*...*
.**.*
...**
#P 27 -208
..*
.***
**.*
***
#P 28 -204
**
#P 28 -199
***
*..*
*
*
#P 29 -195
*
#P 13 -190
*
**
.*
*
#P 13 -186
*
#P 33 -186
..*
.***
.*.**....*
..***...***
..**...**..*
.......*...*
.......*.**
.......**
.
.***
*..*
...*
...*
..*
#P 17 -170
.........***...***
........*..*...*..*
...........*...*
...........*...*
.*........*.....*
**...........*
*.*..........*
............*.*
.
.
....***
...*..*
......*
......*
.....*
#P 48 -186
.*
***
*.**
#P 49 -183
***
**
#P 58 -186
.**
****
**.**
#P 60 -183
**
#P 62 -177
.*..**
**..*
.*..**
#P 68 -181
.....*
......*
..*...*
...****
*
*
*
...****
..*...*
......*
.....*
#P 50 -170
.*
***
***
..*
*.*
#P 47 -165
...*
.
.*
**
*.*
#P 81 -170
*
.*
#P 78 -168
*...*
.****
#P 96 -168
...*
....*
*...*
#P 97 -165
****
#P 96 -160
***
..*
*.*
**
.
.
...*
#P 96 -153
....*
*...*
.****
#P 82 -157
..*
*..*
*..*
.*
#P 88 -154
.**
****
**.**
..**
#P 32 -147
*
*
#P 33 -148
*
*
.*
#P 36 -146
.........*.............*
........***...........***
........*.**....*.....*.**
.........***...***.....***
.........**...**..*....**
..............**.**
..............*..***
...............*.**
.................*
........***..*...*
.......*..*...*.*
..........*....*
..........*
.........*
***
#P 35 -131
*..*
...*...***
...*...*..*...............*
...*...*.................***
...*...*................**.*
..*.....*...............***
.........................**
....***
....*.*
....***
.
.
....***
.....*
#P 17 -119
***
*..*
*
#P 17 -116
*
.*
#P 31 -119
***
*..*
*
*
.*
#P 31 -111
.*
***
*.**
.***
.**
#P 23 -117
.***
*..*
**.*
#P 24 -111
**
*
#P 46 -104
***
*..*
*
#P 46 -101
*
*
.*
#P 14 -102
.***
*..*
...*
#P 16 -99
.*
*
#P 55 -101
.**
****
#P 55 -99
**.**
..**
#P 66 -101
*
.*
#P 63 -99
*...*
.****
#P -35 -241
***
*..*
*
*
#P -34 -237
*
#P -29 -239
.***
*..*
**.*
#P -29 -233
*
*.*
.
.*..*
..***
...*
#P -21 -241
***
*..*
*
*
.*
#P -21 -233
.*
***
*.**
.***
.**
#P -5 -239
.***
*..*
...*
...*
..*
#P -5 -231
..*
.***
**.*
***
.**
#P 9 -239
.***
*..*
...*
#P 11 -236
.*
*
#P 3 -237
***
*..*
*.**
.
.
.
...*
#P 2 -230
..*.*
.
*..*
***
.*
#P -38 -224
.***
*..*
...*
...*
..*
.
.
.
......***
#P -39 -215
.........*
........*
.
.
.
.*
***
*.**
.***
.**
#P 12 -222
*
*
*
#P 12 -219
*
#P -27 -219
.....***...***
....*..*...*..*
.......*...*
.......*...*
......*.....*
.........*
.........*
........*.*
***
..*
.*
.
.
.
.........***
#P -10 -217
.***...***
*..*...*..*
...*...*
...*...*
..*.....*
.....*
.....*
....*.*
............***
............*
.............*
.
.
.
...***
#P 7 -214
**
*
.*
#P 9 -214
*
#P -53 -210
.*
***
*.**
#P -52 -207
***
**
#P -47 -208
..*
.***
**..*
*...*
#P -47 -204
*.**
**
#P -54 -201
.***
*..*
...*
#P -52 -198
.*
*
#P -37 -195
...........***
...........*..*
...........*
.*.........*
***........*
*.**........*
.***
.**
.
.
......*.....*
.....***...***
#P -33 -183
**.*...*.**
***.....***
.**.....**
.
.....*
....***
...*...*
.
.
...**.**
.....*
#P 0 -193
.***
*..*
...*
...*
#P 2 -189
.*
*
#P -74 -190
.***
*..*
...*
...*
#P -72 -186
*
#P -67 -190
........***
.......*..*
.***......*
.*..*.....*
*........*
.
.
.**
.*.......*
........***
.......**.*
.......***
........**
.
.
...........*.....*
..........***...***
#P -69 -173
............*.**.**.*
.............***.***
.............**...**
.
................*
...............*.*..........*
..............*...*.........**
*..............*.*.........*.*
*..............***
*
.
.......................***
.......................*..*
.......................*
.......................*
........................*
#P 7 -189
.....*
....**
....**
.....*
.
.
.*
***
*.**
.***
#P 5 -179
...**
.
*
**
..*
.
.
.**
*
#P -18 -183
**
*.*
.**
#P -18 -179
.
.
.
#P 0 -183
..*
.***
**.*
***
.**
#P 3 -176
.*
*
.
.
**
#P -7 -181
.**
*.*
**
#P -4 -181
.
.
.
#P -75 -173
***
*..*
*
*
.*
#P -71 -166
.*
*
#P -17 -171
.*
**
*.*
#P -17 -167
.
.
.
#P -8 -169
.*
.*
*
#P -6 -168
*
*
#P -61 -151
......**
.....*.*
***....*
*..*
*
#P -61 -146
*
*
.*
#P -22 -107
.**
****
#P -22 -105
**.**
..**
#P -14 -107
.**
****
#P -14 -105
**.**
..**
#P -8 -103
...**
...**
....*
.
.
****
#P -3 -104
**
.**
**
*